{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "33f4219f",
   "metadata": {},
   "source": [
    "# Pandas Tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bcd3c508",
   "metadata": {},
   "source": [
    "Hi Guys, Welcome to [Tirendaz Academy](https://youtube.com/c/tirendazacademy) 😀\n",
    "</br>\n",
    "In this notebook, I'm going to talk about Pandas tutorial.\n",
    "</br>\n",
    "Happy learning 🐱‍🏍 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9718e36c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f002f93a",
   "metadata": {},
   "outputs": [],
   "source": [
    "games = pd.read_csv(\"vgsalesGlobale.csv\", index_col = \"Name\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "cb3d7d50",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Wii Sports</th>\n",
       "      <td>1</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>41.49</td>\n",
       "      <td>29.02</td>\n",
       "      <td>3.77</td>\n",
       "      <td>8.46</td>\n",
       "      <td>82.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Super Mario Bros.</th>\n",
       "      <td>2</td>\n",
       "      <td>NES</td>\n",
       "      <td>1985.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>29.08</td>\n",
       "      <td>3.58</td>\n",
       "      <td>6.81</td>\n",
       "      <td>0.77</td>\n",
       "      <td>40.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mario Kart Wii</th>\n",
       "      <td>3</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.85</td>\n",
       "      <td>12.88</td>\n",
       "      <td>3.79</td>\n",
       "      <td>3.31</td>\n",
       "      <td>35.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wii Sports Resort</th>\n",
       "      <td>4</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.75</td>\n",
       "      <td>11.01</td>\n",
       "      <td>3.28</td>\n",
       "      <td>2.96</td>\n",
       "      <td>33.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pokemon Red/Pokemon Blue</th>\n",
       "      <td>5</td>\n",
       "      <td>GB</td>\n",
       "      <td>1996.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>11.27</td>\n",
       "      <td>8.89</td>\n",
       "      <td>10.22</td>\n",
       "      <td>1.00</td>\n",
       "      <td>31.37</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                          Rank Platform    Year         Genre Publisher  \\\n",
       "Name                                                                      \n",
       "Wii Sports                   1      Wii  2006.0        Sports  Nintendo   \n",
       "Super Mario Bros.            2      NES  1985.0      Platform  Nintendo   \n",
       "Mario Kart Wii               3      Wii  2008.0        Racing  Nintendo   \n",
       "Wii Sports Resort            4      Wii  2009.0        Sports  Nintendo   \n",
       "Pokemon Red/Pokemon Blue     5       GB  1996.0  Role-Playing  Nintendo   \n",
       "\n",
       "                          NA_Sales  EU_Sales  JP_Sales  Other_Sales  \\\n",
       "Name                                                                  \n",
       "Wii Sports                   41.49     29.02      3.77         8.46   \n",
       "Super Mario Bros.            29.08      3.58      6.81         0.77   \n",
       "Mario Kart Wii               15.85     12.88      3.79         3.31   \n",
       "Wii Sports Resort            15.75     11.01      3.28         2.96   \n",
       "Pokemon Red/Pokemon Blue     11.27      8.89     10.22         1.00   \n",
       "\n",
       "                          Global_Sales  \n",
       "Name                                    \n",
       "Wii Sports                       82.74  \n",
       "Super Mario Bros.                40.24  \n",
       "Mario Kart Wii                   35.82  \n",
       "Wii Sports Resort                33.00  \n",
       "Pokemon Red/Pokemon Blue         31.37  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "061c6942",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Mega Brain Boost</th>\n",
       "      <td>16591</td>\n",
       "      <td>DS</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Puzzle</td>\n",
       "      <td>Majesco Entertainment</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirube Kareru</th>\n",
       "      <td>16592</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>dramatic create</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Eiyuu Densetsu: Sora no Kiseki Material Collection Portable</th>\n",
       "      <td>16593</td>\n",
       "      <td>PSP</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Falcom Corporation</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Myst IV: Revelation</th>\n",
       "      <td>16594</td>\n",
       "      <td>PC</td>\n",
       "      <td>2004.0</td>\n",
       "      <td>Adventure</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Plushees</th>\n",
       "      <td>16595</td>\n",
       "      <td>DS</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Simulation</td>\n",
       "      <td>Destineer</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Woody Woodpecker in Crazy Castle 5</th>\n",
       "      <td>16596</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Kemco</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Men in Black II: Alien Escape</th>\n",
       "      <td>16597</td>\n",
       "      <td>GC</td>\n",
       "      <td>2003.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Infogrames</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SCORE International Baja 1000: The Official Game</th>\n",
       "      <td>16598</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Activision</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Know How 2</th>\n",
       "      <td>16599</td>\n",
       "      <td>DS</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Puzzle</td>\n",
       "      <td>7G//AMES</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Spirits &amp; Spells</th>\n",
       "      <td>16600</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2003.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Wanadoo</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "Mega Brain Boost                                    16591       DS  2008.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  16592      PSV  2016.0   \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...  16593      PSP  2007.0   \n",
       "Myst IV: Revelation                                 16594       PC  2004.0   \n",
       "Plushees                                            16595       DS  2008.0   \n",
       "Woody Woodpecker in Crazy Castle 5                  16596      GBA  2002.0   \n",
       "Men in Black II: Alien Escape                       16597       GC  2003.0   \n",
       "SCORE International Baja 1000: The Official Game    16598      PS2  2008.0   \n",
       "Know How 2                                          16599       DS  2010.0   \n",
       "Spirits & Spells                                    16600      GBA  2003.0   \n",
       "\n",
       "                                                           Genre  \\\n",
       "Name                                                               \n",
       "Mega Brain Boost                                          Puzzle   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...        Action   \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...  Role-Playing   \n",
       "Myst IV: Revelation                                    Adventure   \n",
       "Plushees                                              Simulation   \n",
       "Woody Woodpecker in Crazy Castle 5                      Platform   \n",
       "Men in Black II: Alien Escape                            Shooter   \n",
       "SCORE International Baja 1000: The Official Game          Racing   \n",
       "Know How 2                                                Puzzle   \n",
       "Spirits & Spells                                        Platform   \n",
       "\n",
       "                                                                Publisher  \\\n",
       "Name                                                                        \n",
       "Mega Brain Boost                                    Majesco Entertainment   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...        dramatic create   \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...     Falcom Corporation   \n",
       "Myst IV: Revelation                                               Ubisoft   \n",
       "Plushees                                                        Destineer   \n",
       "Woody Woodpecker in Crazy Castle 5                                  Kemco   \n",
       "Men in Black II: Alien Escape                                  Infogrames   \n",
       "SCORE International Baja 1000: The Official Game               Activision   \n",
       "Know How 2                                                       7G//AMES   \n",
       "Spirits & Spells                                                  Wanadoo   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "Mega Brain Boost                                        0.01      0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.00      0.00   \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...      0.00      0.00   \n",
       "Myst IV: Revelation                                     0.01      0.00   \n",
       "Plushees                                                0.01      0.00   \n",
       "Woody Woodpecker in Crazy Castle 5                      0.01      0.00   \n",
       "Men in Black II: Alien Escape                           0.01      0.00   \n",
       "SCORE International Baja 1000: The Official Game        0.00      0.00   \n",
       "Know How 2                                              0.00      0.01   \n",
       "Spirits & Spells                                        0.01      0.00   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "Mega Brain Boost                                        0.00          0.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.01          0.0   \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...      0.01          0.0   \n",
       "Myst IV: Revelation                                     0.00          0.0   \n",
       "Plushees                                                0.00          0.0   \n",
       "Woody Woodpecker in Crazy Castle 5                      0.00          0.0   \n",
       "Men in Black II: Alien Escape                           0.00          0.0   \n",
       "SCORE International Baja 1000: The Official Game        0.00          0.0   \n",
       "Know How 2                                              0.00          0.0   \n",
       "Spirits & Spells                                        0.00          0.0   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "Mega Brain Boost                                            0.01  \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...          0.01  \n",
       "Eiyuu Densetsu: Sora no Kiseki Material Collect...          0.01  \n",
       "Myst IV: Revelation                                         0.01  \n",
       "Plushees                                                    0.01  \n",
       "Woody Woodpecker in Crazy Castle 5                          0.01  \n",
       "Men in Black II: Alien Escape                               0.01  \n",
       "SCORE International Baja 1000: The Official Game            0.01  \n",
       "Know How 2                                                  0.01  \n",
       "Spirits & Spells                                            0.01  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.tail(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "6eaf6873",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16598"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(games)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "ea7ce08c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(16598, 10)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "f8a13b23",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Rank              int64\n",
       "Platform         object\n",
       "Year            float64\n",
       "Genre            object\n",
       "Publisher        object\n",
       "NA_Sales        float64\n",
       "EU_Sales        float64\n",
       "JP_Sales        float64\n",
       "Other_Sales     float64\n",
       "Global_Sales    float64\n",
       "dtype: object"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "46ef8209",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Rank                           300\n",
       "Platform                       PS3\n",
       "Year                        2008.0\n",
       "Genre                 Role-Playing\n",
       "Publisher       Bethesda Softworks\n",
       "NA_Sales                      2.15\n",
       "EU_Sales                       1.2\n",
       "JP_Sales                      0.07\n",
       "Other_Sales                   0.59\n",
       "Global_Sales                  4.01\n",
       "Name: Fallout 3, dtype: object"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.iloc[299]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "3b1332c3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Super Mario Bros.</th>\n",
       "      <td>2</td>\n",
       "      <td>NES</td>\n",
       "      <td>1985.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>29.08</td>\n",
       "      <td>3.58</td>\n",
       "      <td>6.81</td>\n",
       "      <td>0.77</td>\n",
       "      <td>40.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Super Mario Bros.</th>\n",
       "      <td>201</td>\n",
       "      <td>GB</td>\n",
       "      <td>1999.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>3.40</td>\n",
       "      <td>1.30</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.22</td>\n",
       "      <td>5.07</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   Rank Platform    Year     Genre Publisher  NA_Sales  \\\n",
       "Name                                                                     \n",
       "Super Mario Bros.     2      NES  1985.0  Platform  Nintendo     29.08   \n",
       "Super Mario Bros.   201       GB  1999.0  Platform  Nintendo      3.40   \n",
       "\n",
       "                   EU_Sales  JP_Sales  Other_Sales  Global_Sales  \n",
       "Name                                                              \n",
       "Super Mario Bros.      3.58      6.81         0.77         40.24  \n",
       "Super Mario Bros.      1.30      0.15         0.22          5.07  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.loc[\"Super Mario Bros.\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "199af610",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Wii Sports</th>\n",
       "      <td>1</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>41.49</td>\n",
       "      <td>29.02</td>\n",
       "      <td>3.77</td>\n",
       "      <td>8.46</td>\n",
       "      <td>82.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Super Mario Bros.</th>\n",
       "      <td>2</td>\n",
       "      <td>NES</td>\n",
       "      <td>1985.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>29.08</td>\n",
       "      <td>3.58</td>\n",
       "      <td>6.81</td>\n",
       "      <td>0.77</td>\n",
       "      <td>40.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mario Kart Wii</th>\n",
       "      <td>3</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.85</td>\n",
       "      <td>12.88</td>\n",
       "      <td>3.79</td>\n",
       "      <td>3.31</td>\n",
       "      <td>35.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wii Sports Resort</th>\n",
       "      <td>4</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.75</td>\n",
       "      <td>11.01</td>\n",
       "      <td>3.28</td>\n",
       "      <td>2.96</td>\n",
       "      <td>33.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pokemon Red/Pokemon Blue</th>\n",
       "      <td>5</td>\n",
       "      <td>GB</td>\n",
       "      <td>1996.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>11.27</td>\n",
       "      <td>8.89</td>\n",
       "      <td>10.22</td>\n",
       "      <td>1.00</td>\n",
       "      <td>31.37</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                          Rank Platform    Year         Genre Publisher  \\\n",
       "Name                                                                      \n",
       "Wii Sports                   1      Wii  2006.0        Sports  Nintendo   \n",
       "Super Mario Bros.            2      NES  1985.0      Platform  Nintendo   \n",
       "Mario Kart Wii               3      Wii  2008.0        Racing  Nintendo   \n",
       "Wii Sports Resort            4      Wii  2009.0        Sports  Nintendo   \n",
       "Pokemon Red/Pokemon Blue     5       GB  1996.0  Role-Playing  Nintendo   \n",
       "\n",
       "                          NA_Sales  EU_Sales  JP_Sales  Other_Sales  \\\n",
       "Name                                                                  \n",
       "Wii Sports                   41.49     29.02      3.77         8.46   \n",
       "Super Mario Bros.            29.08      3.58      6.81         0.77   \n",
       "Mario Kart Wii               15.85     12.88      3.79         3.31   \n",
       "Wii Sports Resort            15.75     11.01      3.28         2.96   \n",
       "Pokemon Red/Pokemon Blue     11.27      8.89     10.22         1.00   \n",
       "\n",
       "                          Global_Sales  \n",
       "Name                                    \n",
       "Wii Sports                       82.74  \n",
       "Super Mario Bros.                40.24  \n",
       "Mario Kart Wii                   35.82  \n",
       "Wii Sports Resort                33.00  \n",
       "Pokemon Red/Pokemon Blue         31.37  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "7b6fa913",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Checkers</th>\n",
       "      <td>6898</td>\n",
       "      <td>2600</td>\n",
       "      <td>1980.0</td>\n",
       "      <td>Misc</td>\n",
       "      <td>Atari</td>\n",
       "      <td>0.22</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Boxing</th>\n",
       "      <td>2671</td>\n",
       "      <td>2600</td>\n",
       "      <td>1980.0</td>\n",
       "      <td>Fighting</td>\n",
       "      <td>Activision</td>\n",
       "      <td>0.72</td>\n",
       "      <td>0.04</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Freeway</th>\n",
       "      <td>5368</td>\n",
       "      <td>2600</td>\n",
       "      <td>1980.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Activision</td>\n",
       "      <td>0.32</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Defender</th>\n",
       "      <td>1971</td>\n",
       "      <td>2600</td>\n",
       "      <td>1980.0</td>\n",
       "      <td>Misc</td>\n",
       "      <td>Atari</td>\n",
       "      <td>0.99</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>1.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Kaboom!</th>\n",
       "      <td>1768</td>\n",
       "      <td>2600</td>\n",
       "      <td>1980.0</td>\n",
       "      <td>Misc</td>\n",
       "      <td>Activision</td>\n",
       "      <td>1.07</td>\n",
       "      <td>0.07</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>1.15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Rank Platform    Year     Genre   Publisher  NA_Sales  EU_Sales  \\\n",
       "Name                                                                        \n",
       "Checkers  6898     2600  1980.0      Misc       Atari      0.22      0.01   \n",
       "Boxing    2671     2600  1980.0  Fighting  Activision      0.72      0.04   \n",
       "Freeway   5368     2600  1980.0    Action  Activision      0.32      0.02   \n",
       "Defender  1971     2600  1980.0      Misc       Atari      0.99      0.05   \n",
       "Kaboom!   1768     2600  1980.0      Misc  Activision      1.07      0.07   \n",
       "\n",
       "          JP_Sales  Other_Sales  Global_Sales  \n",
       "Name                                           \n",
       "Checkers       0.0         0.00          0.24  \n",
       "Boxing         0.0         0.01          0.77  \n",
       "Freeway        0.0         0.00          0.34  \n",
       "Defender       0.0         0.01          1.05  \n",
       "Kaboom!        0.0         0.01          1.15  "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.sort_values(by = \"Year\").head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "f5f69b3b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Imagine: Makeup Artist</th>\n",
       "      <td>5959</td>\n",
       "      <td>DS</td>\n",
       "      <td>2020.0</td>\n",
       "      <td>Simulation</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>0.27</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Phantasy Star Online 2 Episode 4: Deluxe Package</th>\n",
       "      <td>14393</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Sega</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Phantasy Star Online 2 Episode 4: Deluxe Package</th>\n",
       "      <td>16244</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Sega</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Brothers Conflict: Precious Baby</th>\n",
       "      <td>16441</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Idea Factory</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Shin Megami Tensei IV: Final</th>\n",
       "      <td>8295</td>\n",
       "      <td>3DS</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Deep Silver</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.14</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   Rank Platform    Year  \\\n",
       "Name                                                                       \n",
       "Imagine: Makeup Artist                             5959       DS  2020.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  14393      PS4  2017.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  16244      PSV  2017.0   \n",
       "Brothers Conflict: Precious Baby                  16441      PSV  2017.0   \n",
       "Shin Megami Tensei IV: Final                       8295      3DS  2016.0   \n",
       "\n",
       "                                                         Genre     Publisher  \\\n",
       "Name                                                                           \n",
       "Imagine: Makeup Artist                              Simulation       Ubisoft   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  Role-Playing          Sega   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  Role-Playing          Sega   \n",
       "Brothers Conflict: Precious Baby                        Action  Idea Factory   \n",
       "Shin Megami Tensei IV: Final                      Role-Playing   Deep Silver   \n",
       "\n",
       "                                                  NA_Sales  EU_Sales  \\\n",
       "Name                                                                   \n",
       "Imagine: Makeup Artist                                0.27       0.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.00       0.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.00       0.0   \n",
       "Brothers Conflict: Precious Baby                      0.00       0.0   \n",
       "Shin Megami Tensei IV: Final                          0.03       0.0   \n",
       "\n",
       "                                                  JP_Sales  Other_Sales  \\\n",
       "Name                                                                      \n",
       "Imagine: Makeup Artist                                0.00         0.02   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.03         0.00   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.01         0.00   \n",
       "Brothers Conflict: Precious Baby                      0.01         0.00   \n",
       "Shin Megami Tensei IV: Final                          0.14         0.00   \n",
       "\n",
       "                                                  Global_Sales  \n",
       "Name                                                            \n",
       "Imagine: Makeup Artist                                    0.29  \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package          0.03  \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package          0.01  \n",
       "Brothers Conflict: Precious Baby                          0.01  \n",
       "Shin Megami Tensei IV: Final                              0.17  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.sort_values(by = \"Year\", ascending=False).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "68a6dd41",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Imagine: Makeup Artist</th>\n",
       "      <td>5959</td>\n",
       "      <td>DS</td>\n",
       "      <td>2020.0</td>\n",
       "      <td>Simulation</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>0.27</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Phantasy Star Online 2 Episode 4: Deluxe Package</th>\n",
       "      <td>14393</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Sega</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Phantasy Star Online 2 Episode 4: Deluxe Package</th>\n",
       "      <td>16244</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Sega</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Brothers Conflict: Precious Baby</th>\n",
       "      <td>16441</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2017.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Idea Factory</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>XCOM 2</th>\n",
       "      <td>7566</td>\n",
       "      <td>PC</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Strategy</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>0.09</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.20</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   Rank Platform    Year  \\\n",
       "Name                                                                       \n",
       "Imagine: Makeup Artist                             5959       DS  2020.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  14393      PS4  2017.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  16244      PSV  2017.0   \n",
       "Brothers Conflict: Precious Baby                  16441      PSV  2017.0   \n",
       "XCOM 2                                             7566       PC  2016.0   \n",
       "\n",
       "                                                         Genre  \\\n",
       "Name                                                             \n",
       "Imagine: Makeup Artist                              Simulation   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  Role-Playing   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package  Role-Playing   \n",
       "Brothers Conflict: Precious Baby                        Action   \n",
       "XCOM 2                                                Strategy   \n",
       "\n",
       "                                                             Publisher  \\\n",
       "Name                                                                     \n",
       "Imagine: Makeup Artist                                         Ubisoft   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package                  Sega   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package                  Sega   \n",
       "Brothers Conflict: Precious Baby                          Idea Factory   \n",
       "XCOM 2                                            Take-Two Interactive   \n",
       "\n",
       "                                                  NA_Sales  EU_Sales  \\\n",
       "Name                                                                   \n",
       "Imagine: Makeup Artist                                0.27       0.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.00       0.0   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.00       0.0   \n",
       "Brothers Conflict: Precious Baby                      0.00       0.0   \n",
       "XCOM 2                                                0.09       0.1   \n",
       "\n",
       "                                                  JP_Sales  Other_Sales  \\\n",
       "Name                                                                      \n",
       "Imagine: Makeup Artist                                0.00         0.02   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.03         0.00   \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package      0.01         0.00   \n",
       "Brothers Conflict: Precious Baby                      0.01         0.00   \n",
       "XCOM 2                                                0.00         0.02   \n",
       "\n",
       "                                                  Global_Sales  \n",
       "Name                                                            \n",
       "Imagine: Makeup Artist                                    0.29  \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package          0.03  \n",
       "Phantasy Star Online 2 Episode 4: Deluxe Package          0.01  \n",
       "Brothers Conflict: Precious Baby                          0.01  \n",
       "XCOM 2                                                    0.20  "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.sort_values(by = [\"Year\", \"Genre\"], ascending=False).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "a521be70",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>'98 Koshien</th>\n",
       "      <td>4756</td>\n",
       "      <td>PS</td>\n",
       "      <td>1998.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Magical Company</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.12</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>.hack//G.U. Vol.1//Rebirth</th>\n",
       "      <td>8359</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>.hack//G.U. Vol.2//Reminisce</th>\n",
       "      <td>7109</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.09</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>.hack//G.U. Vol.2//Reminisce (jp sales)</th>\n",
       "      <td>8604</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.16</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>.hack//G.U. Vol.3//Redemption</th>\n",
       "      <td>8306</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>Role-Playing</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         Rank Platform    Year         Genre  \\\n",
       "Name                                                                           \n",
       "'98 Koshien                              4756       PS  1998.0        Sports   \n",
       ".hack//G.U. Vol.1//Rebirth               8359      PS2  2006.0  Role-Playing   \n",
       ".hack//G.U. Vol.2//Reminisce             7109      PS2  2006.0  Role-Playing   \n",
       ".hack//G.U. Vol.2//Reminisce (jp sales)  8604      PS2  2006.0  Role-Playing   \n",
       ".hack//G.U. Vol.3//Redemption            8306      PS2  2007.0  Role-Playing   \n",
       "\n",
       "                                                  Publisher  NA_Sales  \\\n",
       "Name                                                                    \n",
       "'98 Koshien                                 Magical Company      0.15   \n",
       ".hack//G.U. Vol.1//Rebirth               Namco Bandai Games      0.00   \n",
       ".hack//G.U. Vol.2//Reminisce             Namco Bandai Games      0.11   \n",
       ".hack//G.U. Vol.2//Reminisce (jp sales)  Namco Bandai Games      0.00   \n",
       ".hack//G.U. Vol.3//Redemption            Namco Bandai Games      0.00   \n",
       "\n",
       "                                         EU_Sales  JP_Sales  Other_Sales  \\\n",
       "Name                                                                       \n",
       "'98 Koshien                                  0.10      0.12         0.03   \n",
       ".hack//G.U. Vol.1//Rebirth                   0.00      0.17         0.00   \n",
       ".hack//G.U. Vol.2//Reminisce                 0.09      0.00         0.03   \n",
       ".hack//G.U. Vol.2//Reminisce (jp sales)      0.00      0.16         0.00   \n",
       ".hack//G.U. Vol.3//Redemption                0.00      0.17         0.00   \n",
       "\n",
       "                                         Global_Sales  \n",
       "Name                                                   \n",
       "'98 Koshien                                      0.41  \n",
       ".hack//G.U. Vol.1//Rebirth                       0.17  \n",
       ".hack//G.U. Vol.2//Reminisce                     0.23  \n",
       ".hack//G.U. Vol.2//Reminisce (jp sales)          0.16  \n",
       ".hack//G.U. Vol.3//Redemption                    0.17  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games.sort_index().head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "61a2719e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Name\n",
       "Wii Sports                   Nintendo\n",
       "Super Mario Bros.            Nintendo\n",
       "Mario Kart Wii               Nintendo\n",
       "Wii Sports Resort            Nintendo\n",
       "Pokemon Red/Pokemon Blue     Nintendo\n",
       "Tetris                       Nintendo\n",
       "New Super Mario Bros.        Nintendo\n",
       "Wii Play                     Nintendo\n",
       "New Super Mario Bros. Wii    Nintendo\n",
       "Duck Hunt                    Nintendo\n",
       "Name: Publisher, dtype: object"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games[\"Publisher\"].head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "619f5879",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>17</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>7.01</td>\n",
       "      <td>9.27</td>\n",
       "      <td>0.97</td>\n",
       "      <td>4.14</td>\n",
       "      <td>21.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: San Andreas</th>\n",
       "      <td>18</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2004.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.43</td>\n",
       "      <td>0.40</td>\n",
       "      <td>0.41</td>\n",
       "      <td>10.57</td>\n",
       "      <td>20.81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>24</td>\n",
       "      <td>X360</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.63</td>\n",
       "      <td>5.31</td>\n",
       "      <td>0.06</td>\n",
       "      <td>1.38</td>\n",
       "      <td>16.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: Vice City</th>\n",
       "      <td>25</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>8.41</td>\n",
       "      <td>5.49</td>\n",
       "      <td>0.47</td>\n",
       "      <td>1.78</td>\n",
       "      <td>16.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto III</th>\n",
       "      <td>39</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2001.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>6.99</td>\n",
       "      <td>4.51</td>\n",
       "      <td>0.30</td>\n",
       "      <td>1.30</td>\n",
       "      <td>13.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Original Frisbee Disc Sports: Ultimate &amp; Golf</th>\n",
       "      <td>16567</td>\n",
       "      <td>DS</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Destination Software, Inc</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fujiko F. Fujio Characters: Great Assembly! Slightly Fantastic Slapstick Party</th>\n",
       "      <td>16570</td>\n",
       "      <td>3DS</td>\n",
       "      <td>2014.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Planet Monsters</th>\n",
       "      <td>16585</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2001.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Titus</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Carmageddon 64</th>\n",
       "      <td>16586</td>\n",
       "      <td>N64</td>\n",
       "      <td>1999.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Virgin Interactive</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirube Kareru</th>\n",
       "      <td>16592</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>dramatic create</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3316 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "Grand Theft Auto V                                     17      PS3  2013.0   \n",
       "Grand Theft Auto: San Andreas                          18      PS2  2004.0   \n",
       "Grand Theft Auto V                                     24     X360  2013.0   \n",
       "Grand Theft Auto: Vice City                            25      PS2  2002.0   \n",
       "Grand Theft Auto III                                   39      PS2  2001.0   \n",
       "...                                                   ...      ...     ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       16567       DS  2007.0   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  16570      3DS  2014.0   \n",
       "Planet Monsters                                     16585      GBA  2001.0   \n",
       "Carmageddon 64                                      16586      N64  1999.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  16592      PSV  2016.0   \n",
       "\n",
       "                                                     Genre  \\\n",
       "Name                                                         \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: San Andreas                       Action   \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: Vice City                         Action   \n",
       "Grand Theft Auto III                                Action   \n",
       "...                                                    ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       Action   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  Action   \n",
       "Planet Monsters                                     Action   \n",
       "Carmageddon 64                                      Action   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  Action   \n",
       "\n",
       "                                                                    Publisher  \\\n",
       "Name                                                                            \n",
       "Grand Theft Auto V                                       Take-Two Interactive   \n",
       "Grand Theft Auto: San Andreas                            Take-Two Interactive   \n",
       "Grand Theft Auto V                                       Take-Two Interactive   \n",
       "Grand Theft Auto: Vice City                              Take-Two Interactive   \n",
       "Grand Theft Auto III                                     Take-Two Interactive   \n",
       "...                                                                       ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       Destination Software, Inc   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...         Namco Bandai Games   \n",
       "Planet Monsters                                                         Titus   \n",
       "Carmageddon 64                                             Virgin Interactive   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...            dramatic create   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "Grand Theft Auto V                                      7.01      9.27   \n",
       "Grand Theft Auto: San Andreas                           9.43      0.40   \n",
       "Grand Theft Auto V                                      9.63      5.31   \n",
       "Grand Theft Auto: Vice City                             8.41      5.49   \n",
       "Grand Theft Auto III                                    6.99      4.51   \n",
       "...                                                      ...       ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf           0.01      0.00   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.00      0.00   \n",
       "Planet Monsters                                         0.01      0.00   \n",
       "Carmageddon 64                                          0.01      0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.00      0.00   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "Grand Theft Auto V                                      0.97         4.14   \n",
       "Grand Theft Auto: San Andreas                           0.41        10.57   \n",
       "Grand Theft Auto V                                      0.06         1.38   \n",
       "Grand Theft Auto: Vice City                             0.47         1.78   \n",
       "Grand Theft Auto III                                    0.30         1.30   \n",
       "...                                                      ...          ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf           0.00         0.00   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.01         0.00   \n",
       "Planet Monsters                                         0.00         0.00   \n",
       "Carmageddon 64                                          0.00         0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.01         0.00   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "Grand Theft Auto V                                         21.40  \n",
       "Grand Theft Auto: San Andreas                              20.81  \n",
       "Grand Theft Auto V                                         16.38  \n",
       "Grand Theft Auto: Vice City                                16.15  \n",
       "Grand Theft Auto III                                       13.10  \n",
       "...                                                          ...  \n",
       "Original Frisbee Disc Sports: Ultimate & Golf               0.01  \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...          0.01  \n",
       "Planet Monsters                                             0.01  \n",
       "Carmageddon 64                                              0.01  \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...          0.01  \n",
       "\n",
       "[3316 rows x 10 columns]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games[games[\"Genre\"] ==\"Action\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "19dd5c21",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>17</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>7.01</td>\n",
       "      <td>9.27</td>\n",
       "      <td>0.97</td>\n",
       "      <td>4.14</td>\n",
       "      <td>21.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: San Andreas</th>\n",
       "      <td>18</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2004.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.43</td>\n",
       "      <td>0.40</td>\n",
       "      <td>0.41</td>\n",
       "      <td>10.57</td>\n",
       "      <td>20.81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>24</td>\n",
       "      <td>X360</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.63</td>\n",
       "      <td>5.31</td>\n",
       "      <td>0.06</td>\n",
       "      <td>1.38</td>\n",
       "      <td>16.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: Vice City</th>\n",
       "      <td>25</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>8.41</td>\n",
       "      <td>5.49</td>\n",
       "      <td>0.47</td>\n",
       "      <td>1.78</td>\n",
       "      <td>16.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto III</th>\n",
       "      <td>39</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2001.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>6.99</td>\n",
       "      <td>4.51</td>\n",
       "      <td>0.30</td>\n",
       "      <td>1.30</td>\n",
       "      <td>13.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Original Frisbee Disc Sports: Ultimate &amp; Golf</th>\n",
       "      <td>16567</td>\n",
       "      <td>DS</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Destination Software, Inc</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fujiko F. Fujio Characters: Great Assembly! Slightly Fantastic Slapstick Party</th>\n",
       "      <td>16570</td>\n",
       "      <td>3DS</td>\n",
       "      <td>2014.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Planet Monsters</th>\n",
       "      <td>16585</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2001.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Titus</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Carmageddon 64</th>\n",
       "      <td>16586</td>\n",
       "      <td>N64</td>\n",
       "      <td>1999.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Virgin Interactive</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirube Kareru</th>\n",
       "      <td>16592</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>dramatic create</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3316 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "Grand Theft Auto V                                     17      PS3  2013.0   \n",
       "Grand Theft Auto: San Andreas                          18      PS2  2004.0   \n",
       "Grand Theft Auto V                                     24     X360  2013.0   \n",
       "Grand Theft Auto: Vice City                            25      PS2  2002.0   \n",
       "Grand Theft Auto III                                   39      PS2  2001.0   \n",
       "...                                                   ...      ...     ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       16567       DS  2007.0   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  16570      3DS  2014.0   \n",
       "Planet Monsters                                     16585      GBA  2001.0   \n",
       "Carmageddon 64                                      16586      N64  1999.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  16592      PSV  2016.0   \n",
       "\n",
       "                                                     Genre  \\\n",
       "Name                                                         \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: San Andreas                       Action   \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: Vice City                         Action   \n",
       "Grand Theft Auto III                                Action   \n",
       "...                                                    ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       Action   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  Action   \n",
       "Planet Monsters                                     Action   \n",
       "Carmageddon 64                                      Action   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  Action   \n",
       "\n",
       "                                                                    Publisher  \\\n",
       "Name                                                                            \n",
       "Grand Theft Auto V                                       Take-Two Interactive   \n",
       "Grand Theft Auto: San Andreas                            Take-Two Interactive   \n",
       "Grand Theft Auto V                                       Take-Two Interactive   \n",
       "Grand Theft Auto: Vice City                              Take-Two Interactive   \n",
       "Grand Theft Auto III                                     Take-Two Interactive   \n",
       "...                                                                       ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf       Destination Software, Inc   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...         Namco Bandai Games   \n",
       "Planet Monsters                                                         Titus   \n",
       "Carmageddon 64                                             Virgin Interactive   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...            dramatic create   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "Grand Theft Auto V                                      7.01      9.27   \n",
       "Grand Theft Auto: San Andreas                           9.43      0.40   \n",
       "Grand Theft Auto V                                      9.63      5.31   \n",
       "Grand Theft Auto: Vice City                             8.41      5.49   \n",
       "Grand Theft Auto III                                    6.99      4.51   \n",
       "...                                                      ...       ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf           0.01      0.00   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.00      0.00   \n",
       "Planet Monsters                                         0.01      0.00   \n",
       "Carmageddon 64                                          0.01      0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.00      0.00   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "Grand Theft Auto V                                      0.97         4.14   \n",
       "Grand Theft Auto: San Andreas                           0.41        10.57   \n",
       "Grand Theft Auto V                                      0.06         1.38   \n",
       "Grand Theft Auto: Vice City                             0.47         1.78   \n",
       "Grand Theft Auto III                                    0.30         1.30   \n",
       "...                                                      ...          ...   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf           0.00         0.00   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.01         0.00   \n",
       "Planet Monsters                                         0.00         0.00   \n",
       "Carmageddon 64                                          0.00         0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.01         0.00   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "Grand Theft Auto V                                         21.40  \n",
       "Grand Theft Auto: San Andreas                              20.81  \n",
       "Grand Theft Auto V                                         16.38  \n",
       "Grand Theft Auto: Vice City                                16.15  \n",
       "Grand Theft Auto III                                       13.10  \n",
       "...                                                          ...  \n",
       "Original Frisbee Disc Sports: Ultimate & Golf               0.01  \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...          0.01  \n",
       "Planet Monsters                                             0.01  \n",
       "Carmageddon 64                                              0.01  \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...          0.01  \n",
       "\n",
       "[3316 rows x 10 columns]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games_by_genre = games[\"Genre\"] ==\"Action\"\n",
    "games[games_by_genre]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "b72e5bde",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Red Dead Redemption</th>\n",
       "      <td>124</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>2.79</td>\n",
       "      <td>2.61</td>\n",
       "      <td>0.17</td>\n",
       "      <td>1.03</td>\n",
       "      <td>6.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Red Dead Redemption</th>\n",
       "      <td>135</td>\n",
       "      <td>X360</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>3.70</td>\n",
       "      <td>1.97</td>\n",
       "      <td>0.09</td>\n",
       "      <td>0.57</td>\n",
       "      <td>6.34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>God of War III</th>\n",
       "      <td>217</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Sony Computer Entertainment</td>\n",
       "      <td>2.74</td>\n",
       "      <td>1.36</td>\n",
       "      <td>0.12</td>\n",
       "      <td>0.63</td>\n",
       "      <td>4.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Assassin's Creed: Brotherhood</th>\n",
       "      <td>374</td>\n",
       "      <td>X360</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>2.84</td>\n",
       "      <td>0.39</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.24</td>\n",
       "      <td>3.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Assassin's Creed: Brotherhood</th>\n",
       "      <td>515</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>1.87</td>\n",
       "      <td>0.57</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.30</td>\n",
       "      <td>2.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Marvel Superheroes 3D: Grandmaster's Challenge</th>\n",
       "      <td>15721</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Neko Entertainment</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Metal Fight Beyblade: Choujou Kessen! Big Bang Bladers</th>\n",
       "      <td>15771</td>\n",
       "      <td>DS</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Hudson Soft</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dark Void</th>\n",
       "      <td>15792</td>\n",
       "      <td>PC</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Capcom</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Shin Sangoku Musou Online: Souten Ranbu</th>\n",
       "      <td>15871</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Tecmo Koei</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Monkey Madness: Island Escape</th>\n",
       "      <td>16161</td>\n",
       "      <td>DS</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Storm City Games</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>226 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "Red Dead Redemption                                   124      PS3  2010.0   \n",
       "Red Dead Redemption                                   135     X360  2010.0   \n",
       "God of War III                                        217      PS3  2010.0   \n",
       "Assassin's Creed: Brotherhood                         374     X360  2010.0   \n",
       "Assassin's Creed: Brotherhood                         515      PS3  2010.0   \n",
       "...                                                   ...      ...     ...   \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge      15721      Wii  2010.0   \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...  15771       DS  2010.0   \n",
       "Dark Void                                           15792       PC  2010.0   \n",
       "Shin Sangoku Musou Online: Souten Ranbu             15871      PS3  2010.0   \n",
       "Monkey Madness: Island Escape                       16161       DS  2010.0   \n",
       "\n",
       "                                                     Genre  \\\n",
       "Name                                                         \n",
       "Red Dead Redemption                                 Action   \n",
       "Red Dead Redemption                                 Action   \n",
       "God of War III                                      Action   \n",
       "Assassin's Creed: Brotherhood                       Action   \n",
       "Assassin's Creed: Brotherhood                       Action   \n",
       "...                                                    ...   \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge      Action   \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...  Action   \n",
       "Dark Void                                           Action   \n",
       "Shin Sangoku Musou Online: Souten Ranbu             Action   \n",
       "Monkey Madness: Island Escape                       Action   \n",
       "\n",
       "                                                                      Publisher  \\\n",
       "Name                                                                              \n",
       "Red Dead Redemption                                        Take-Two Interactive   \n",
       "Red Dead Redemption                                        Take-Two Interactive   \n",
       "God of War III                                      Sony Computer Entertainment   \n",
       "Assassin's Creed: Brotherhood                                           Ubisoft   \n",
       "Assassin's Creed: Brotherhood                                           Ubisoft   \n",
       "...                                                                         ...   \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge               Neko Entertainment   \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...                  Hudson Soft   \n",
       "Dark Void                                                                Capcom   \n",
       "Shin Sangoku Musou Online: Souten Ranbu                              Tecmo Koei   \n",
       "Monkey Madness: Island Escape                                  Storm City Games   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "Red Dead Redemption                                     2.79      2.61   \n",
       "Red Dead Redemption                                     3.70      1.97   \n",
       "God of War III                                          2.74      1.36   \n",
       "Assassin's Creed: Brotherhood                           2.84      0.39   \n",
       "Assassin's Creed: Brotherhood                           1.87      0.57   \n",
       "...                                                      ...       ...   \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge          0.00      0.01   \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...      0.00      0.00   \n",
       "Dark Void                                               0.00      0.01   \n",
       "Shin Sangoku Musou Online: Souten Ranbu                 0.00      0.00   \n",
       "Monkey Madness: Island Escape                           0.01      0.00   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "Red Dead Redemption                                     0.17         1.03   \n",
       "Red Dead Redemption                                     0.09         0.57   \n",
       "God of War III                                          0.12         0.63   \n",
       "Assassin's Creed: Brotherhood                           0.03         0.24   \n",
       "Assassin's Creed: Brotherhood                           0.11         0.30   \n",
       "...                                                      ...          ...   \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge          0.00         0.00   \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...      0.02         0.00   \n",
       "Dark Void                                               0.00         0.00   \n",
       "Shin Sangoku Musou Online: Souten Ranbu                 0.02         0.00   \n",
       "Monkey Madness: Island Escape                           0.00         0.00   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "Red Dead Redemption                                         6.60  \n",
       "Red Dead Redemption                                         6.34  \n",
       "God of War III                                              4.84  \n",
       "Assassin's Creed: Brotherhood                               3.50  \n",
       "Assassin's Creed: Brotherhood                               2.84  \n",
       "...                                                          ...  \n",
       "Marvel Superheroes 3D: Grandmaster's Challenge              0.02  \n",
       "Metal Fight Beyblade: Choujou Kessen! Big Bang ...          0.02  \n",
       "Dark Void                                                   0.02  \n",
       "Shin Sangoku Musou Online: Souten Ranbu                     0.02  \n",
       "Monkey Madness: Island Escape                               0.01  \n",
       "\n",
       "[226 rows x 10 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games_in_2010 = games[\"Year\"] == 2010\n",
    "games[games_by_genre & games_in_2010]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "f9210e9a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Kinect Adventures!</th>\n",
       "      <td>16</td>\n",
       "      <td>X360</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Misc</td>\n",
       "      <td>Microsoft Game Studios</td>\n",
       "      <td>14.97</td>\n",
       "      <td>4.94</td>\n",
       "      <td>0.24</td>\n",
       "      <td>1.67</td>\n",
       "      <td>21.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>17</td>\n",
       "      <td>PS3</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>7.01</td>\n",
       "      <td>9.27</td>\n",
       "      <td>0.97</td>\n",
       "      <td>4.14</td>\n",
       "      <td>21.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: San Andreas</th>\n",
       "      <td>18</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2004.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.43</td>\n",
       "      <td>0.40</td>\n",
       "      <td>0.41</td>\n",
       "      <td>10.57</td>\n",
       "      <td>20.81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto V</th>\n",
       "      <td>24</td>\n",
       "      <td>X360</td>\n",
       "      <td>2013.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>9.63</td>\n",
       "      <td>5.31</td>\n",
       "      <td>0.06</td>\n",
       "      <td>1.38</td>\n",
       "      <td>16.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grand Theft Auto: Vice City</th>\n",
       "      <td>25</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Take-Two Interactive</td>\n",
       "      <td>8.41</td>\n",
       "      <td>5.49</td>\n",
       "      <td>0.47</td>\n",
       "      <td>1.78</td>\n",
       "      <td>16.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fujiko F. Fujio Characters: Great Assembly! Slightly Fantastic Slapstick Party</th>\n",
       "      <td>16570</td>\n",
       "      <td>3DS</td>\n",
       "      <td>2014.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Namco Bandai Games</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Planet Monsters</th>\n",
       "      <td>16585</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2001.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Titus</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Carmageddon 64</th>\n",
       "      <td>16586</td>\n",
       "      <td>N64</td>\n",
       "      <td>1999.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Virgin Interactive</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirube Kareru</th>\n",
       "      <td>16592</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>dramatic create</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Know How 2</th>\n",
       "      <td>16599</td>\n",
       "      <td>DS</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Puzzle</td>\n",
       "      <td>7G//AMES</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4349 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "Kinect Adventures!                                     16     X360  2010.0   \n",
       "Grand Theft Auto V                                     17      PS3  2013.0   \n",
       "Grand Theft Auto: San Andreas                          18      PS2  2004.0   \n",
       "Grand Theft Auto V                                     24     X360  2013.0   \n",
       "Grand Theft Auto: Vice City                            25      PS2  2002.0   \n",
       "...                                                   ...      ...     ...   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  16570      3DS  2014.0   \n",
       "Planet Monsters                                     16585      GBA  2001.0   \n",
       "Carmageddon 64                                      16586      N64  1999.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  16592      PSV  2016.0   \n",
       "Know How 2                                          16599       DS  2010.0   \n",
       "\n",
       "                                                     Genre  \\\n",
       "Name                                                         \n",
       "Kinect Adventures!                                    Misc   \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: San Andreas                       Action   \n",
       "Grand Theft Auto V                                  Action   \n",
       "Grand Theft Auto: Vice City                         Action   \n",
       "...                                                    ...   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...  Action   \n",
       "Planet Monsters                                     Action   \n",
       "Carmageddon 64                                      Action   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  Action   \n",
       "Know How 2                                          Puzzle   \n",
       "\n",
       "                                                                 Publisher  \\\n",
       "Name                                                                         \n",
       "Kinect Adventures!                                  Microsoft Game Studios   \n",
       "Grand Theft Auto V                                    Take-Two Interactive   \n",
       "Grand Theft Auto: San Andreas                         Take-Two Interactive   \n",
       "Grand Theft Auto V                                    Take-Two Interactive   \n",
       "Grand Theft Auto: Vice City                           Take-Two Interactive   \n",
       "...                                                                    ...   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      Namco Bandai Games   \n",
       "Planet Monsters                                                      Titus   \n",
       "Carmageddon 64                                          Virgin Interactive   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...         dramatic create   \n",
       "Know How 2                                                        7G//AMES   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "Kinect Adventures!                                     14.97      4.94   \n",
       "Grand Theft Auto V                                      7.01      9.27   \n",
       "Grand Theft Auto: San Andreas                           9.43      0.40   \n",
       "Grand Theft Auto V                                      9.63      5.31   \n",
       "Grand Theft Auto: Vice City                             8.41      5.49   \n",
       "...                                                      ...       ...   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.00      0.00   \n",
       "Planet Monsters                                         0.01      0.00   \n",
       "Carmageddon 64                                          0.01      0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.00      0.00   \n",
       "Know How 2                                              0.00      0.01   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "Kinect Adventures!                                      0.24         1.67   \n",
       "Grand Theft Auto V                                      0.97         4.14   \n",
       "Grand Theft Auto: San Andreas                           0.41        10.57   \n",
       "Grand Theft Auto V                                      0.06         1.38   \n",
       "Grand Theft Auto: Vice City                             0.47         1.78   \n",
       "...                                                      ...          ...   \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...      0.01         0.00   \n",
       "Planet Monsters                                         0.00         0.00   \n",
       "Carmageddon 64                                          0.00         0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.01         0.00   \n",
       "Know How 2                                              0.00         0.00   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "Kinect Adventures!                                         21.82  \n",
       "Grand Theft Auto V                                         21.40  \n",
       "Grand Theft Auto: San Andreas                              20.81  \n",
       "Grand Theft Auto V                                         16.38  \n",
       "Grand Theft Auto: Vice City                                16.15  \n",
       "...                                                          ...  \n",
       "Fujiko F. Fujio Characters: Great Assembly! Sli...          0.01  \n",
       "Planet Monsters                                             0.01  \n",
       "Carmageddon 64                                              0.01  \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...          0.01  \n",
       "Know How 2                                                  0.01  \n",
       "\n",
       "[4349 rows x 10 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games[games_by_genre | games_in_2010]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "6bc14abe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>FIFA 17</th>\n",
       "      <td>222</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Electronic Arts</td>\n",
       "      <td>0.28</td>\n",
       "      <td>3.75</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.69</td>\n",
       "      <td>4.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Uncharted 4: A Thief's End</th>\n",
       "      <td>272</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Sony Computer Entertainment</td>\n",
       "      <td>1.30</td>\n",
       "      <td>2.07</td>\n",
       "      <td>0.18</td>\n",
       "      <td>0.65</td>\n",
       "      <td>4.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tom Clancy's The Division</th>\n",
       "      <td>352</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>1.28</td>\n",
       "      <td>1.61</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.57</td>\n",
       "      <td>3.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Far Cry: Primal</th>\n",
       "      <td>772</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>0.59</td>\n",
       "      <td>1.16</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.33</td>\n",
       "      <td>2.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tom Clancy's The Division</th>\n",
       "      <td>847</td>\n",
       "      <td>XOne</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Ubisoft</td>\n",
       "      <td>1.20</td>\n",
       "      <td>0.62</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.18</td>\n",
       "      <td>2.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mighty No. 9</th>\n",
       "      <td>16565</td>\n",
       "      <td>XOne</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Deep Silver</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Resident Evil 4 HD</th>\n",
       "      <td>16572</td>\n",
       "      <td>XOne</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Capcom</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Farming 2017 - The Simulation</th>\n",
       "      <td>16573</td>\n",
       "      <td>PS4</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Simulation</td>\n",
       "      <td>UIG Entertainment</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Rugby Challenge 3</th>\n",
       "      <td>16579</td>\n",
       "      <td>XOne</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Alternative Software</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirube Kareru</th>\n",
       "      <td>16592</td>\n",
       "      <td>PSV</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>dramatic create</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>348 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     Rank Platform    Year  \\\n",
       "Name                                                                         \n",
       "FIFA 17                                               222      PS4  2016.0   \n",
       "Uncharted 4: A Thief's End                            272      PS4  2016.0   \n",
       "Tom Clancy's The Division                             352      PS4  2016.0   \n",
       "Far Cry: Primal                                       772      PS4  2016.0   \n",
       "Tom Clancy's The Division                             847     XOne  2016.0   \n",
       "...                                                   ...      ...     ...   \n",
       "Mighty No. 9                                        16565     XOne  2016.0   \n",
       "Resident Evil 4 HD                                  16572     XOne  2016.0   \n",
       "Farming 2017 - The Simulation                       16573      PS4  2016.0   \n",
       "Rugby Challenge 3                                   16579     XOne  2016.0   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...  16592      PSV  2016.0   \n",
       "\n",
       "                                                         Genre  \\\n",
       "Name                                                             \n",
       "FIFA 17                                                 Sports   \n",
       "Uncharted 4: A Thief's End                             Shooter   \n",
       "Tom Clancy's The Division                              Shooter   \n",
       "Far Cry: Primal                                         Action   \n",
       "Tom Clancy's The Division                              Shooter   \n",
       "...                                                        ...   \n",
       "Mighty No. 9                                          Platform   \n",
       "Resident Evil 4 HD                                     Shooter   \n",
       "Farming 2017 - The Simulation                       Simulation   \n",
       "Rugby Challenge 3                                       Sports   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      Action   \n",
       "\n",
       "                                                                      Publisher  \\\n",
       "Name                                                                              \n",
       "FIFA 17                                                         Electronic Arts   \n",
       "Uncharted 4: A Thief's End                          Sony Computer Entertainment   \n",
       "Tom Clancy's The Division                                               Ubisoft   \n",
       "Far Cry: Primal                                                         Ubisoft   \n",
       "Tom Clancy's The Division                                               Ubisoft   \n",
       "...                                                                         ...   \n",
       "Mighty No. 9                                                        Deep Silver   \n",
       "Resident Evil 4 HD                                                       Capcom   \n",
       "Farming 2017 - The Simulation                                 UIG Entertainment   \n",
       "Rugby Challenge 3                                          Alternative Software   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...              dramatic create   \n",
       "\n",
       "                                                    NA_Sales  EU_Sales  \\\n",
       "Name                                                                     \n",
       "FIFA 17                                                 0.28      3.75   \n",
       "Uncharted 4: A Thief's End                              1.30      2.07   \n",
       "Tom Clancy's The Division                               1.28      1.61   \n",
       "Far Cry: Primal                                         0.59      1.16   \n",
       "Tom Clancy's The Division                               1.20      0.62   \n",
       "...                                                      ...       ...   \n",
       "Mighty No. 9                                            0.01      0.00   \n",
       "Resident Evil 4 HD                                      0.01      0.00   \n",
       "Farming 2017 - The Simulation                           0.00      0.01   \n",
       "Rugby Challenge 3                                       0.00      0.01   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.00      0.00   \n",
       "\n",
       "                                                    JP_Sales  Other_Sales  \\\n",
       "Name                                                                        \n",
       "FIFA 17                                                 0.06         0.69   \n",
       "Uncharted 4: A Thief's End                              0.18         0.65   \n",
       "Tom Clancy's The Division                               0.15         0.57   \n",
       "Far Cry: Primal                                         0.06         0.33   \n",
       "Tom Clancy's The Division                               0.00         0.18   \n",
       "...                                                      ...          ...   \n",
       "Mighty No. 9                                            0.00         0.00   \n",
       "Resident Evil 4 HD                                      0.00         0.00   \n",
       "Farming 2017 - The Simulation                           0.00         0.00   \n",
       "Rugby Challenge 3                                       0.00         0.00   \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...      0.01         0.00   \n",
       "\n",
       "                                                    Global_Sales  \n",
       "Name                                                              \n",
       "FIFA 17                                                     4.77  \n",
       "Uncharted 4: A Thief's End                                  4.20  \n",
       "Tom Clancy's The Division                                   3.61  \n",
       "Far Cry: Primal                                             2.13  \n",
       "Tom Clancy's The Division                                   2.01  \n",
       "...                                                          ...  \n",
       "Mighty No. 9                                                0.01  \n",
       "Resident Evil 4 HD                                          0.01  \n",
       "Farming 2017 - The Simulation                               0.01  \n",
       "Rugby Challenge 3                                           0.01  \n",
       "Chou Ezaru wa Akai Hana: Koi wa Tsuki ni Shirub...          0.01  \n",
       "\n",
       "[348 rows x 10 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "after_2015 = games[\"Year\"] > 2015\n",
    "games[after_2015]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "97a0ba56",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Wii Sports</th>\n",
       "      <td>1</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>41.49</td>\n",
       "      <td>29.02</td>\n",
       "      <td>3.77</td>\n",
       "      <td>8.46</td>\n",
       "      <td>82.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mario Kart Wii</th>\n",
       "      <td>3</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.85</td>\n",
       "      <td>12.88</td>\n",
       "      <td>3.79</td>\n",
       "      <td>3.31</td>\n",
       "      <td>35.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wii Sports Resort</th>\n",
       "      <td>4</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.75</td>\n",
       "      <td>11.01</td>\n",
       "      <td>3.28</td>\n",
       "      <td>2.96</td>\n",
       "      <td>33.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>New Super Mario Bros.</th>\n",
       "      <td>7</td>\n",
       "      <td>DS</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>11.38</td>\n",
       "      <td>9.23</td>\n",
       "      <td>6.50</td>\n",
       "      <td>2.90</td>\n",
       "      <td>30.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wii Play</th>\n",
       "      <td>8</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Misc</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>14.03</td>\n",
       "      <td>9.20</td>\n",
       "      <td>2.93</td>\n",
       "      <td>2.85</td>\n",
       "      <td>29.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Woody Woodpecker in Crazy Castle 5</th>\n",
       "      <td>16596</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Kemco</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Men in Black II: Alien Escape</th>\n",
       "      <td>16597</td>\n",
       "      <td>GC</td>\n",
       "      <td>2003.0</td>\n",
       "      <td>Shooter</td>\n",
       "      <td>Infogrames</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SCORE International Baja 1000: The Official Game</th>\n",
       "      <td>16598</td>\n",
       "      <td>PS2</td>\n",
       "      <td>2008.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Activision</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Know How 2</th>\n",
       "      <td>16599</td>\n",
       "      <td>DS</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Puzzle</td>\n",
       "      <td>7G//AMES</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Spirits &amp; Spells</th>\n",
       "      <td>16600</td>\n",
       "      <td>GBA</td>\n",
       "      <td>2003.0</td>\n",
       "      <td>Platform</td>\n",
       "      <td>Wanadoo</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10467 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   Rank Platform    Year  \\\n",
       "Name                                                                       \n",
       "Wii Sports                                            1      Wii  2006.0   \n",
       "Mario Kart Wii                                        3      Wii  2008.0   \n",
       "Wii Sports Resort                                     4      Wii  2009.0   \n",
       "New Super Mario Bros.                                 7       DS  2006.0   \n",
       "Wii Play                                              8      Wii  2006.0   \n",
       "...                                                 ...      ...     ...   \n",
       "Woody Woodpecker in Crazy Castle 5                16596      GBA  2002.0   \n",
       "Men in Black II: Alien Escape                     16597       GC  2003.0   \n",
       "SCORE International Baja 1000: The Official Game  16598      PS2  2008.0   \n",
       "Know How 2                                        16599       DS  2010.0   \n",
       "Spirits & Spells                                  16600      GBA  2003.0   \n",
       "\n",
       "                                                     Genre   Publisher  \\\n",
       "Name                                                                     \n",
       "Wii Sports                                          Sports    Nintendo   \n",
       "Mario Kart Wii                                      Racing    Nintendo   \n",
       "Wii Sports Resort                                   Sports    Nintendo   \n",
       "New Super Mario Bros.                             Platform    Nintendo   \n",
       "Wii Play                                              Misc    Nintendo   \n",
       "...                                                    ...         ...   \n",
       "Woody Woodpecker in Crazy Castle 5                Platform       Kemco   \n",
       "Men in Black II: Alien Escape                      Shooter  Infogrames   \n",
       "SCORE International Baja 1000: The Official Game    Racing  Activision   \n",
       "Know How 2                                          Puzzle    7G//AMES   \n",
       "Spirits & Spells                                  Platform     Wanadoo   \n",
       "\n",
       "                                                  NA_Sales  EU_Sales  \\\n",
       "Name                                                                   \n",
       "Wii Sports                                           41.49     29.02   \n",
       "Mario Kart Wii                                       15.85     12.88   \n",
       "Wii Sports Resort                                    15.75     11.01   \n",
       "New Super Mario Bros.                                11.38      9.23   \n",
       "Wii Play                                             14.03      9.20   \n",
       "...                                                    ...       ...   \n",
       "Woody Woodpecker in Crazy Castle 5                    0.01      0.00   \n",
       "Men in Black II: Alien Escape                         0.01      0.00   \n",
       "SCORE International Baja 1000: The Official Game      0.00      0.00   \n",
       "Know How 2                                            0.00      0.01   \n",
       "Spirits & Spells                                      0.01      0.00   \n",
       "\n",
       "                                                  JP_Sales  Other_Sales  \\\n",
       "Name                                                                      \n",
       "Wii Sports                                            3.77         8.46   \n",
       "Mario Kart Wii                                        3.79         3.31   \n",
       "Wii Sports Resort                                     3.28         2.96   \n",
       "New Super Mario Bros.                                 6.50         2.90   \n",
       "Wii Play                                              2.93         2.85   \n",
       "...                                                    ...          ...   \n",
       "Woody Woodpecker in Crazy Castle 5                    0.00         0.00   \n",
       "Men in Black II: Alien Escape                         0.00         0.00   \n",
       "SCORE International Baja 1000: The Official Game      0.00         0.00   \n",
       "Know How 2                                            0.00         0.00   \n",
       "Spirits & Spells                                      0.00         0.00   \n",
       "\n",
       "                                                  Global_Sales  \n",
       "Name                                                            \n",
       "Wii Sports                                               82.74  \n",
       "Mario Kart Wii                                           35.82  \n",
       "Wii Sports Resort                                        33.00  \n",
       "New Super Mario Bros.                                    30.01  \n",
       "Wii Play                                                 29.02  \n",
       "...                                                        ...  \n",
       "Woody Woodpecker in Crazy Castle 5                        0.01  \n",
       "Men in Black II: Alien Escape                             0.01  \n",
       "SCORE International Baja 1000: The Official Game          0.01  \n",
       "Know How 2                                                0.01  \n",
       "Spirits & Spells                                          0.01  \n",
       "\n",
       "[10467 rows x 10 columns]"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mid_2000s = games[\"Year\"].between(2000, 2010)\n",
    "games[mid_2000s]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "93b9cc0a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Rank</th>\n",
       "      <th>Platform</th>\n",
       "      <th>Year</th>\n",
       "      <th>Genre</th>\n",
       "      <th>Publisher</th>\n",
       "      <th>NA_Sales</th>\n",
       "      <th>EU_Sales</th>\n",
       "      <th>JP_Sales</th>\n",
       "      <th>Other_Sales</th>\n",
       "      <th>Global_Sales</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Wii Sports</th>\n",
       "      <td>1</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>41.49</td>\n",
       "      <td>29.02</td>\n",
       "      <td>3.77</td>\n",
       "      <td>8.46</td>\n",
       "      <td>82.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Wii Sports Resort</th>\n",
       "      <td>4</td>\n",
       "      <td>Wii</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Nintendo</td>\n",
       "      <td>15.75</td>\n",
       "      <td>11.01</td>\n",
       "      <td>3.28</td>\n",
       "      <td>2.96</td>\n",
       "      <td>33.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Kinect Sports</th>\n",
       "      <td>140</td>\n",
       "      <td>X360</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Microsoft Game Studios</td>\n",
       "      <td>3.92</td>\n",
       "      <td>1.78</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.51</td>\n",
       "      <td>6.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Forza Motorsport 3</th>\n",
       "      <td>161</td>\n",
       "      <td>X360</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Microsoft Game Studios</td>\n",
       "      <td>2.99</td>\n",
       "      <td>1.92</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.51</td>\n",
       "      <td>5.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Forza Motorsport 4</th>\n",
       "      <td>229</td>\n",
       "      <td>X360</td>\n",
       "      <td>2011.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Microsoft Game Studios</td>\n",
       "      <td>2.08</td>\n",
       "      <td>2.04</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.47</td>\n",
       "      <td>4.64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Disney Sports Football</th>\n",
       "      <td>15664</td>\n",
       "      <td>GC</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Konami Digital Entertainment</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Winter Sports 3: The Great Tournament</th>\n",
       "      <td>15823</td>\n",
       "      <td>X360</td>\n",
       "      <td>2010.0</td>\n",
       "      <td>Sports</td>\n",
       "      <td>Tradewest</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IHRA Drag Racing: Sportsman Edition</th>\n",
       "      <td>15957</td>\n",
       "      <td>XB</td>\n",
       "      <td>2006.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Bethesda Softworks</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>RalliSport Challenge(JP sales)</th>\n",
       "      <td>16328</td>\n",
       "      <td>XB</td>\n",
       "      <td>2002.0</td>\n",
       "      <td>Racing</td>\n",
       "      <td>Microsoft Game Studios</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Original Frisbee Disc Sports: Ultimate &amp; Golf</th>\n",
       "      <td>16567</td>\n",
       "      <td>DS</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>Action</td>\n",
       "      <td>Destination Software, Inc</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>119 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                Rank Platform    Year   Genre  \\\n",
       "Name                                                                            \n",
       "Wii Sports                                         1      Wii  2006.0  Sports   \n",
       "Wii Sports Resort                                  4      Wii  2009.0  Sports   \n",
       "Kinect Sports                                    140     X360  2010.0  Sports   \n",
       "Forza Motorsport 3                               161     X360  2009.0  Racing   \n",
       "Forza Motorsport 4                               229     X360  2011.0  Racing   \n",
       "...                                              ...      ...     ...     ...   \n",
       "Disney Sports Football                         15664       GC  2002.0  Sports   \n",
       "Winter Sports 3: The Great Tournament          15823     X360  2010.0  Sports   \n",
       "IHRA Drag Racing: Sportsman Edition            15957       XB  2006.0  Racing   \n",
       "RalliSport Challenge(JP sales)                 16328       XB  2002.0  Racing   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf  16567       DS  2007.0  Action   \n",
       "\n",
       "                                                                  Publisher  \\\n",
       "Name                                                                          \n",
       "Wii Sports                                                         Nintendo   \n",
       "Wii Sports Resort                                                  Nintendo   \n",
       "Kinect Sports                                        Microsoft Game Studios   \n",
       "Forza Motorsport 3                                   Microsoft Game Studios   \n",
       "Forza Motorsport 4                                   Microsoft Game Studios   \n",
       "...                                                                     ...   \n",
       "Disney Sports Football                         Konami Digital Entertainment   \n",
       "Winter Sports 3: The Great Tournament                             Tradewest   \n",
       "IHRA Drag Racing: Sportsman Edition                      Bethesda Softworks   \n",
       "RalliSport Challenge(JP sales)                       Microsoft Game Studios   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf     Destination Software, Inc   \n",
       "\n",
       "                                               NA_Sales  EU_Sales  JP_Sales  \\\n",
       "Name                                                                          \n",
       "Wii Sports                                        41.49     29.02      3.77   \n",
       "Wii Sports Resort                                 15.75     11.01      3.28   \n",
       "Kinect Sports                                      3.92      1.78      0.03   \n",
       "Forza Motorsport 3                                 2.99      1.92      0.10   \n",
       "Forza Motorsport 4                                 2.08      2.04      0.06   \n",
       "...                                                 ...       ...       ...   \n",
       "Disney Sports Football                             0.01      0.00      0.00   \n",
       "Winter Sports 3: The Great Tournament              0.00      0.01      0.00   \n",
       "IHRA Drag Racing: Sportsman Edition                0.01      0.00      0.00   \n",
       "RalliSport Challenge(JP sales)                     0.00      0.00      0.01   \n",
       "Original Frisbee Disc Sports: Ultimate & Golf      0.01      0.00      0.00   \n",
       "\n",
       "                                               Other_Sales  Global_Sales  \n",
       "Name                                                                      \n",
       "Wii Sports                                            8.46         82.74  \n",
       "Wii Sports Resort                                     2.96         33.00  \n",
       "Kinect Sports                                         0.51          6.24  \n",
       "Forza Motorsport 3                                    0.51          5.51  \n",
       "Forza Motorsport 4                                    0.47          4.64  \n",
       "...                                                    ...           ...  \n",
       "Disney Sports Football                                0.00          0.02  \n",
       "Winter Sports 3: The Great Tournament                 0.00          0.02  \n",
       "IHRA Drag Racing: Sportsman Edition                   0.00          0.02  \n",
       "RalliSport Challenge(JP sales)                        0.00          0.01  \n",
       "Original Frisbee Disc Sports: Ultimate & Golf         0.00          0.01  \n",
       "\n",
       "[119 rows x 10 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sport_in_title = games.index.str.lower().str.contains(\"sport\")\n",
    "games[sport_in_title]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "e9858ab3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.53744065550074"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "games[\"Global_Sales\"].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "0a499117",
   "metadata": {},
   "outputs": [],
   "source": [
    "genres = games.groupby(\"Genre\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "0fd99287",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Genre\n",
       "Action          1751.18\n",
       "Adventure        239.04\n",
       "Fighting         448.91\n",
       "Misc             809.96\n",
       "Platform         831.37\n",
       "Puzzle           244.95\n",
       "Racing           732.04\n",
       "Role-Playing     927.37\n",
       "Shooter         1037.37\n",
       "Simulation       392.20\n",
       "Sports          1330.93\n",
       "Strategy         175.12\n",
       "Name: Global_Sales, dtype: float64"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "genres[\"Global_Sales\"].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "8a4461b2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Genre\n",
       "Action          1751.18\n",
       "Sports          1330.93\n",
       "Shooter         1037.37\n",
       "Role-Playing     927.37\n",
       "Platform         831.37\n",
       "Misc             809.96\n",
       "Racing           732.04\n",
       "Fighting         448.91\n",
       "Simulation       392.20\n",
       "Puzzle           244.95\n",
       "Adventure        239.04\n",
       "Strategy         175.12\n",
       "Name: Global_Sales, dtype: float64"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "genres[\"Global_Sales\"].sum().sort_values(ascending = False)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "560a94dd",
   "metadata": {},
   "source": [
    "Don't forget to follow us on [YouTube](http://youtube.com/tirendazacademy) | [Medium](http://tirendazacademy.medium.com) | [Twitter](http://twitter.com/tirendazacademy) | [GitHub](http://github.com/tirendazacademy) | [Linkedin](https://www.linkedin.com/in/tirendaz-academy) | [Kaggle](https://www.kaggle.com/tirendazacademy) 😎"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
